//引入base类继承
import { Base } from '../../utils/base.js';
class Index extends Base {
  constructor() {
    super();
  }
  /**
   * banner图片
   */
  getBannerData(callBack) {
    var params = {
      url: 'banner',
      sCallBack: function (res) {
        callBack && callBack(res.data);
      }
    }
    this.request(params);
  }
  /**
   * 通过溯源码查到商品信息
   */
  getCommodityData(source_num,callBack){
    var params = {
      url: 'commodity?source_num=' + source_num,
      sCallBack: function (res) {
        callBack && callBack(res.data);
      }
    }
    this.request(params);
  }
  /**
   * 通过溯源码查到产品信息
   */
  getBatchData(source_num, callBack) {
    var params = {
      url: 'batch?source_num=' + source_num,
      sCallBack: function (res) {
        callBack && callBack(res.data);
      }
    }
    this.request(params);
  }
  /**
   * 通过溯源码查询修剪,除草，施肥信息
   */
  getSourceData(source_num, callBack) {
    var params = {
      url: 'source?source_num=' + source_num,
      sCallBack: function (res) {
        callBack && callBack(res.data);
      }
    }
    this.request(params);
  }
}
export { Index };